package org.crazyit.activiti_d2._1_Init;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;

import java.util.Map;

public class Init {

    public static void main(String[] args) {

        //初始化ProcessEngines 的Map
        //再加载Activiti 默认的配置文件 (classpath 下的activiti.cfg.xml 文件)
        //如果与Spring 整合, 则读取classPath 下的activiti-context.xml 文件
        ProcessEngines.init();

        //得到ProcessEngines 的Map
        Map<String, ProcessEngine> engines = ProcessEngines.getProcessEngines();
        System.out.println(engines.size());
        System.out.println(engines.get("default"));

    }

}
